#import "OdysseyVortexController.h"
        
#import "OdysseyVortexModel.h"
#import "OdysseyVortexCell.h"
#import "Masonry.h"

@interface OdysseyVortexController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *flourishCollectionView;
@property (nonatomic, strong) NSMutableArray *umbraDataSource;

@end

@implementation OdysseyVortexController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self rebirthVirtuousConfigsui];
	[self crispUpliftgetData];
}


//: 懒加载数据模型数组
- (NSMutableArray *)umbraDataSource {
	if (!_umbraDataSource) {
		_umbraDataSource = [NSMutableArray array];
	}
	return _umbraDataSource;
}

- (void)rebirthVirtuousConfigsui {
    UICollectionViewFlowLayout *vowPioneerVelvet = [[UICollectionViewFlowLayout alloc] init];
    vowPioneerVelvet.minimumLineSpacing = 10;
    vowPioneerVelvet.minimumInteritemSpacing = 10;
    vowPioneerVelvet.itemSize = CGSizeMake(100, 100);
    vowPioneerVelvet.scrollDirection = UICollectionViewScrollDirectionVertical;
    
    self.flourishCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:vowPioneerVelvet];
    self.flourishCollectionView.backgroundColor = UIColor.clearColor;
    self.flourishCollectionView.delegate = self;
    self.flourishCollectionView.dataSource = self;
    self.flourishCollectionView.showsHorizontalScrollIndicator = NO;
    self.flourishCollectionView.showsVerticalScrollIndicator = NO;
    [self.flourishCollectionView registerClass:[OdysseyVortexCell class] forCellWithReuseIdentifier:NSStringFromClass([OdysseyVortexCell class])];
    
    [self.view addSubview:self.flourishCollectionView];
    [self.flourishCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}

//: 获取数据模型
- (void)crispUpliftgetData {
	
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.umbraDataSource.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    OdysseyVortexCell *upliftRipple = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([OdysseyVortexCell class]) forIndexPath:indexPath];
    return upliftRipple;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
